[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 getviewsettings()       Get Current Viewport Information

 #include   <graphics.h>

 void far                getviewsettings(vport);
 struct viewporttype far *vport;

    getviewsettings() returns the current viewport's absolute screen
    coordinates and clipping status.  This information is stored in the
    viewporttype structure pointed to by 'vport'.
    The viewporttype structure is defined in <graphics.h> as:

          struct viewporttype {
               int left, top, right, bottom;
               int clip;
          };


    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

           #include <graphics.h>
           #include <conio.h>

           main()
           {
               int gdriver = DETECT;
               int gmode;
               struct viewporttype vtype;
               int left, top, right, bottom;

               initgraph(&gdriver,&gmode,"");
               getviewsettings(&vtype);
               left = vtype.left;
               top = vtype.top;
               right = vtype.right;
               bottom = vtype.bottom;
               rectangle(left,top,right,bottom);
               getch();
               closegraph();
           }


See Also: initgraph() getgraphmode() setviewport()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson